#include <iostream>
#include <string>

using namespace std;

class My_class
{
private:
    int val_1;
    int val_2;

public:
    void set_val(int val_1, int val_2)
    {
        if (this == NULL)   // this 为空问题
        {
            cout << "this 为 null" << endl;
            return;
        }

        this->val_1 = val_1;    // 函数参数 与 成员变量重名
        this->val_2 = val_2;
    }

    void show()
    {
        if (this == NULL)
        {
            cout << "this 为 null" << endl;
            return;
        }
        cout << "val_1 = " << val_1 << " val_2 = " << val_2 << endl;
    }
};

int main(int argc, char const *argv[])
{
    My_class *ptr = NULL;

    ptr->set_val(80, 90);

    ptr->show();

    return 0;
}